import Vue from 'vue'
import VueRouter from 'vue-router'
// import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    // component: HomeView,
    component: () =>
      import(/* webpackChunkName: "about" */ '@/views/HomeView.vue'),
    meta: {
      title: '首页',
      isAuth: false
    }
  }

]

const router = new VueRouter({
  routes,
  mode: 'history',
  base: process.env.NODE_ENV === 'production' ? process.env.VUE_APP_BASE_URL : '/',
  scrollBehavior: () => ({ y: 0 })
})

export default router
